package entity;

import java.io.Serializable;

public class Movie implements Serializable {
    private static final long serialVersionUID = 1L;
    private String id;
    private String name;
    private String director;
    private String actors;
    private String description;
    private int duration;
    private double rating;

    public Movie(String id, String name, String director, String actors, String description, int duration, double rating) {
        this.id = id;
        this.name = name;
        this.director = director;
        this.actors = actors;
        this.description = description;
        this.duration = duration;
        this.rating = rating;
    }

    // Getter 和 Setter 方法
    public String getId() { return id; }
    public void setId(String id) { this.id = id; }
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    public String getDirector() { return director; }
    public void setDirector(String director) { this.director = director; }
    public String getActors() { return actors; }
    public void setActors(String actors) { this.actors = actors; }
    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }
    public int getDuration() { return duration; }
    public void setDuration(int duration) { this.duration = duration; }
    public double getRating() { return rating; }
    public void setRating(double rating) { this.rating = rating; }

    @Override
    public String toString() {
        return "Movie{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", director='" + director + '\'' +
                ", actors='" + actors + '\'' +
                ", duration=" + duration +
                ", rating=" + rating +
                '}';
    }
}